﻿<script type="text/x-jquery-tmpl" id="widget_template">
<div id="${ID}" {{if IsExpanded}} class="d-widget" {{else}} class="d-widget d-widget-collapsed" {{/if}} {{if CssText}} style="${CssText}" {{/if}}>
<h2 {{if ShowHeader}} class="d-widget-header" {{else}} class="d-widget-header d-widget-header-hide" {{/if}} {{if HeaderCssText}} style="${HeaderCssText}" {{/if}}>
<a class="d-widget-title-link" {{if TitleLinkUrl}} href="${TitleLinkUrl}" {{else}} href="javascript:void(0);" {{/if}}>
<img src="${IconUrl}" alt="${Title}" class="d-widget-icon"  style="{{if IconUrl}} display:inline; {{else}} display:none; {{/if}}" />
<span class="d-widget-title-text">${Title}</span>
</a>
<ul class="d-widget-verbs">
<li><span class="d-widget-verb d-widget-verb-setting" title="@Html.Global("Widget_ShowUserPreferences")"></span></li>
<li><span class="d-widget-verb d-widget-verb-export" title="@Html.Global("Widget_ExportUserPreferences")"></span></li>
<li><span class="d-widget-verb d-widget-verb-refresh" title="@Html.Global("RES_REFRESH")"></span></li>
{{if IsDeletable}}
<li><span class="d-widget-verb d-widget-verb-delete" title="@Html.Global("Widget_Delete")"></span></li>
{{/if}}
{{if IsClosable}}
 <li>
 <span class="d-widget-verb d-widget-verb-toggle" title="@Html.Global("Widget_Toggle")" ></span>
</li>
{{/if}}
</ul>
</h2>
<div class="d-widget-body" {{if !IsExpanded}} style="display:none;" {{/if}} {{if BodyCssText}} style="${BodyCssText}" {{/if}}></div>
<div class="d-widget-footer">
<table><tr>
<td><a href="javascript:void(0);" class="d-widget-common-settings"><img  style="float:left;margin-left:5px;" src="@Url.Content("~/content/images/icon_process_16.png")" alt="settings" class="d-icon" />@Html.Global("RES_SETTINGS")</a></td>
<td><div class="d-widget-designer"><img src="@Url.Content("~/content/images/icon_color_16.png")" style="float:left;margin-right:5px;" />@Html.Global("RES_DESIGN")</div></td>
</tr></table>
<div class="d-widget-designer-menu d-menu"><ul class="d-menu-container">
<li class="d-menu-item"><input type="hidden" value="@(Url.Action("WidgetDesigner","Widget",new {Area="",section=""}))?wid=${ID}" /><a href="javascript:void(0);" style="display:block;" class="d-menu-item-link"><span class="d-menu-item-text">@Html.Global("Widget_Box")</span></a></li>
<li class="d-menu-item"><input type="hidden" value="@(Url.Action("WidgetDesigner","Widget",new {Area="",section=".d-widget-header"}))&wid=${ID}" /><a href="javascript:void(0);" class="d-menu-item-link"><span class="d-menu-item-text">@Html.Global("Widget_Header")</span></a></li>
<li class="d-menu-item"><input type="hidden" value="@(Url.Action("WidgetDesigner","Widget",new {Area="",section=".d-widget-body"} ))&wid=${ID}" /><a href="javascript:void(0);"class="d-menu-item-link"><span class="d-menu-item-text">@Html.Global("Widget_Body")</span></a></li>
</ul>
</div>

</div>
</div>
</script>
<script id="widget_setting_dlg_tmpl" type="text/x-jquery-tmpl">
<div style="background-color: #ffffff; color: #000000;" title="${Title} - @Html.Global("Widget_CommSettings")">
    <form style="padding:10px;" action="@Url.Action("Apply", "Widget", new { Area = "" })/${ID}">
    <div>
        <label for="txtWidgetTitle">
            @Html.Global("RES_TITLE")</label></div>
    <div>
    <input type="text" id="txtWidgetTitle" name="title" value="${Title}"/>
    </div>
    <div>
        <label for="txtWidgetTitleLink">
           @Html.Global("Widget_TitleLink")</label></div>
    <div>
        <input type="text" id="txtWidgetTitleLink"  name="titleLinkUrl" value="${TitleLinkUrl}" /></div>
    <div>
        <label for="txtWidgetIconLink">
            @Html.Global("Widget_IconLink")</label></div>
    <div>
        <input type="text" id="txtWidgetIconLink" name="iconUrl" value="${IconUrl}"/></div>
    <div style="clear:left;">
        <input type="checkbox" {{if ShowHeader}} checked="checked" {{/if}}  id="cbShowHeader" onclick="$('#cbShowHeaderValueHolder').val($(this).attr('checked') ? 'true':'false');" /><label for="cbShowHeader">@Html.Global("Widget_ShowHeader")</label>
        <input type="hidden" name="showHeader" value="${ShowHeader}" id="cbShowHeaderValueHolder" />
    </div>
    <div  style="clear:left;">
         <input type="checkbox" {{if ShowBorder}} checked="checked" {{/if}}   id="cbShowBorder" onclick="$('#cbShowBodyValueHolder').val($(this).attr('checked') ? 'true':'false');"/><label for="cbShowBorder">@Html.Global("Widget_ShowBorder")</label>
         <input type="hidden"  value="${ShowBorder}" name="showBorder" id="cbShowBodyValueHolder" />
     </div>
   </form>
</div>
</script>
